[mirrors]
http://leptonica.com/source/leptonica-1.73.tar.gz

[vars]
filesize=10894175
sha512=4808474d5941a91fbf542a22fed26ddc33f9c4baf2699096acf5e894b7e4e84889d165373b7d1df391a68cda8176113cf122f15203a9e38d3059e17140efc575
uchkurl=http://leptonica.com/download.html

[deps]
zlib
libpng
libjpeg
libtiff
giflib

[build]
patch -p1 < "$K"/liblepton_pngio.patch
patch -p1 < "$K"/liblepton-endianness.patch
#CFLAGS=-D_GNU_SOURCE ./configure -C --prefix="$butch_prefix"
cd src

sed -i 's/HAVE_LIBGIF/1/' gifio.c

make -j$MAKE_THREADS -f makefile.static CC="$CC -ansi -D_BSD_SOURCE -DANSI"

# installing headers
dest="$butch_install_dir/include/leptonica"
mkdir -p "$dest"
cp *.h "$dest"/

#installing lib
dest="$butch_install_dir/lib"
mkdir -p "$dest"
cp ../lib/nodebug/liblept.a "$dest"/

#make DESTDIR="$butch_install_dir" -f makefile.static install
